import axios from '@/common/config/axiosConfig'
import qs from 'qs'

export const userLogin = (data) => {
  console.log(data)
  return axios.request({
    url: '/api/v1/login',
    params: data,
    paramsSerializer: function (data) {
      return qs.stringify(data)
    },
    method: 'get'
  })
}

export const userLogout = (data) => {
  return axios.request({
    url: '/api/v1/signOut',
    params: data,
    method: 'get'
  })
}

export const userInfo = (data) => {
  return axios.request({
    url: '/api/v1/account/userInfo',
    params: data,
    method: 'get'
  })
}
export const permissions = (data) => {
  return axios.request({
    url: '/api/v1/permission',
    params: data,
    method: 'get'
  })
}
export const getUserMenu = (data) => {
  return axios.request({
    url: '/api/v1/account/menu',
    params: data,
    method: 'get'
  })
}
